package com.finance.rule.request;


import com.finance.base.constant.PatternConstants;
import com.finance.framework.lang.valid.EnumValid;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;


@Data
public class PieceRangeReq {
		private String id;//唯一标识
		@Length(max=10,message = "规则别名长度小于10")
	    private String nickName;//规则别名
		@Pattern(regexp = PatternConstants.PATTERN_NUMBER_ONE_OR_TWO,message = "激活状态只能是0或1")
		private String state;//激活状态
		@Length(max=20,message = "供货商编码长度小于20")
		@NotBlank(message = "供货商不能为空")
	    private String supplierCode;//供货商编码
	    private String snapshot;//规则快照
		@Length(max=10,message = "省份编码长度小于10")
		@NotBlank(message = "省份编码不能为空")
		private String province;//省份编码
		@Length(max=10,message = "城市编码长度小于10")
		private String city;//城市编码
		@Length(max=10,message = "目的地区县编码长度小于10")
		private String county;//地区县编码
		@EnumValid(enums = {"0","1","2"},message = "运单配送类型枚举")
		private String direction;//运单配送类型
		@EnumValid(enums = {"0","1","2","3"},message = "合作商类型枚举")
		private String settlementType;//合作商类型
		@Length(max = 11,message = "首件单价不能超过11位")
		@Pattern(regexp = PatternConstants.PATTERN_NUMBER_TWO_DECIMAL_POINT,message = "首件单价最多两位小数")
		private String firstPrice;//首件单价（元）
		@Length(max = 11,message = "拖件单价不能超过11位")
		@Pattern(regexp = PatternConstants.PATTERN_NUMBER_TWO_DECIMAL_POINT,message = "拖件单价最多两位小数")
		private String secondPrice;//拖件单价（元）
		@EnumValid(enums = {"0","1"},message = "运输温度等级枚举")
		private String temperature;//运输温度等级 枚举 (0常温 1生鲜冷链)
		@EnumValid(enums = {"0","1","2"},message = "包裹大小规格枚举")
		private String packageSize;//包裹大小规格 枚举 (0未知 1小件 2大件)
		@EnumValid(enums = {"0","1"},message = "签收方式枚举")
		private String signer;//签收方式 (1是0非)
		@EnumValid(enums = {"0","1","2","3","4","5","6","7","8"},message = "配送时效要求枚举")
		private String expressScheduleType;//配送时效要求 枚举 0未知 1当日达 2次晨达 3三日达 4工作日 5节假日 6夜间配 7上午达 8下午达
		@EnumValid(enums = {"0","1"},message = "是否含待收款枚举")
		private String cod;//是否含待收款
}